package com.itheima.io2;

import java.io.*;

/**
 * @author Anomaly
 * @date 2023/2/9 22:27
 */
public class BufferedReaderDemo {
    public static void main(String[] args) {
        try (
                Reader r = new FileReader("file-io/src/test.txt");
                BufferedReader br = new BufferedReader(r)
        ) {
            String line;
            while ((line = br.readLine()) != null) {
                System.out.println(line);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
